<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent {
            display: flex;
            width: 600px;
            height: 120px;
            padding: 10px 0;
            border: 1px solid #999;
        }
        .item {
            width: 100px;
            height: 50px;
            background-color: orange;
            font-size: 40px;
            color: #fff;
            text-align: center;
            border: 1px solid #e1e1e1;
        }
        .item:first-child {
            font-size: 20px;
        }
        .parent1 {
            display: flex;
            width: 600px;
            height: 100px;
            border: 1px solid #999;
        }
        .item1 {
            width: 100px;
            background-color: orange;
            font-size: 40px;
            color: #fff;
            text-align: center;
            border: 1px solid #e1e1e1;
        }
    </style>
</head>
<body>
    <h3>align-items: stretch;</h3>
    <p>如果项目未设置高度或设为auto。将占满整个容器的高度。</p>
    <div class="parent1" style="align-items: stretch;">
        <div class="item1">1</div>
        <div class="item1">2</div>
        <div class="item1">3</div>
        <div class="item1">4</div>
    </div>
    <h3>align-items: flex-start;</h3>
    <p>交叉轴的起点对齐。默认情况下顶部对齐。</p>
    <div class="parent" style="align-items: flex-start;">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
    </div>
    <h3>align-items: flex-end;</h3>
    <p>交叉轴的终点对齐。默认情况下底部对齐。</p>
    <div class="parent" style="align-items: flex-end;">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
    </div>
    <h3>align-items: center;</h3>
    <p>交叉轴的中点对齐，表现为垂直居中对齐。</p>
    <div class="parent" style="align-items: center;">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
    </div>
    <h3>align-items: baseline;</h3>
    <p>子项的第一行文字的基线对齐。</p>
    <div class="parent" style="align-items: baseline;">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
    </div>
</body>
</html>